﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Employeer/Employeer.master"
    CodeFile="ChangePassword.aspx.cs" Inherits="Employeer_ChangePassword" Title="npljobs.com || Change Password" %>

<%@ Register Namespace="AjaxControlToolkit" Assembly="AjaxControlToolkit" TagPrefix="ajax" %>

<asp:Content ID="contentBody" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel runat="server" ID="upWholePage">
        <ContentTemplate>
            <div style="display: block; margin-bottom: 10px" class="row-block-width orange-gradiant">
                <h3 class="panel-title text-center">Change password</h3>
            </div>
            <div class="panel-body post-new-job">
                <div class="RowBlockStyle">
                    <asp:ChangePassword ID="ChangePwd" runat="server" ContinueButtonType="Link"
                        OnSendMailError="ChangePwd_SendMailError" NewPasswordRegularExpressionErrorMessage="Error: Your password must be at least 6 characters long"
                        ChangePasswordFailureText="" ContinueDestinationPageUrl="~/Default.aspx">
                        <ChangePasswordTemplate>
                            <div class="row form-row">
                                <div class="row form-body application-req">
                                    <div class="ControlDiv manage-profile change-password">
                                        <label class="labelStyle col-md-2 control-label">
                                            Current Password <small>*</small></label>
                                        <div class="col-md-9">
                                            <asp:TextBox ID="CurrentPassword" CssClass="TextBoxStyle form-control" runat="server" TextMode="Password" />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="CurrentPassword" SetFocusOnError="true"
                                                ErrorMessage="Old password is required." ToolTip="Old password is required." Display="Dynamic"
                                                ValidationGroup="changePass"></asp:RequiredFieldValidator>
                                            <asp:CustomValidator runat="server" Visible="true" ID="CustomValidator1" ControlToValidate="CurrentPassword" Display="Dynamic"
                                                ErrorMessage="Incorrect current password" OnServerValidate="cusCurrentPass_ServerValidate"
                                                ValidationGroup="changePass">
                                            </asp:CustomValidator>
                                        </div>
                                    </div>
                                    <div class="ControlDiv manage-profile change-password">
                                        <label class="labelStyle col-md-2 control-label">
                                            New Password <small>*</small></label>
                                        <div class="col-md-9">
                                            <asp:TextBox ID="NewPassword" CssClass="TextBoxStyle form-control" runat="server" TextMode="Password" MaxLength="15"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="NewPassword"
                                                SetFocusOnError="True" ErrorMessage="New password is required." Display="Dynamic"
                                                ToolTip="Old password is required." ValidationGroup="changePass"></asp:RequiredFieldValidator>
                                            <asp:CustomValidator runat="server" ID="CustomValidator2" ControlToValidate="NewPassword" Display="Dynamic"
                                                ErrorMessage="Password length must be 6 or more characters" OnServerValidate="cusCustom_ServerValidate"
                                                ValidationGroup="changePass">
                                            </asp:CustomValidator>
                                            <ajax:PasswordStrength ID="PasswordStrength2" TargetControlID="NewPassword" StrengthIndicatorType="Text"
                                                PrefixText="Strength:" HelpStatusLabelID="lblhelp" PreferredPasswordLength="8"
                                                MinimumNumericCharacters="1" MinimumSymbolCharacters="1" TextStrengthDescriptions="Very Poor;Weak;Average;Good;Excellent"
                                                StrengthStyles="VeryPoorStrength;WeakStrength;AverageStrength;GoodStrength;ExcellentStrength"
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="ControlDiv manage-profile change-password">
                                        <label class="labelStyle col-md-2 control-label">
                                            Confirm Password <small>*</small></label>
                                        <div class="col-md-9">
                                            <asp:TextBox ID="ConfirmNewPassword" CssClass="TextBoxStyle form-control" runat="server" TextMode="Password" MaxLength="15"></asp:TextBox>
                                            <asp:RequiredFieldValidator Display="Dynamic" ID="reqConfirmNewPassword" runat="server"
                                                ControlToValidate="ConfirmNewPassword" SetFocusOnError="True" ErrorMessage="Please re-enter password to confirm"
                                                ToolTip="Confirm password is required." ValidationGroup="changePass"></asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="cmvConfirmPwd" runat="server" ControlToCompare="NewPassword"
                                                ControlToValidate="ConfirmNewPassword" ValidationGroup="changePass" Display="Dynamic"
                                                ErrorMessage="Confirm password must be same as new password" ForeColor="Red" SetFocusOnError="True"></asp:CompareValidator>

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group" style="margin-left: 25%;">
                                <asp:Literal ID="FailureText" runat="server" EnableViewState="False" />
                                <%--<asp:ValidationSummary ForeColor="Red" ID="valSumChangePass" runat="server" ShowSummary="true" ValidationGroup="changePass" />--%>
                            </div>
                        </ChangePasswordTemplate>
                        <MailDefinition BodyFileName="~/JobSeeker/EmailTemplates/ChangePassword.htm" IsBodyHtml="True"
                            Subject="Your password has been changed!" Priority="High">
                        </MailDefinition>
                        <%--    <SuccessTemplate>
                                                Password changed sucessfully!<br />
                                                <%--<asp:LinkButton ID="lnkContinue" Text="Continue" runat="server" PostBackUrl="~/Default.aspx"></asp:LinkButton>--%>
                        <%--    </SuccessTemplate>--%>
                    </asp:ChangePassword>

                </div>
                <div class="RowBlockStyle" style="width: 100%;">
                    <div>
                       &nbsp;&nbsp;&nbsp; <asp:Label ID="lblSaveMsg" runat="server" Font-Size="Medium" Font-Italic="true" Font-Bold="true" ForeColor="Green"></asp:Label>
                        <asp:UpdateProgress ID="upProWholePage" DisplayAfter="10" runat="server" AssociatedUpdatePanelID="upWholePage">
                            <ProgressTemplate>
                                <div id="progressBackgroundFilter"></div>
                                <div id="processMessage">
                                    <table>
                                        <tr>
                                            <td>
                                                <img alt="Loading..." src="/img/please_wait.gif" /></span>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </div>
                </div>
                <div class="RowBlockStyle" style="width: 100%;">
                    <div style="float: right; margin-right: 10px;">
                        <asp:Button ID="btnCancel" Text="CANCEL" runat="server" CssClass="btn btn-primary orange-gradiant float-shadow"
                            Visible="false" OnClientClick="Cancelation(); return false;" />
                        <span class="float-shadow">
                            <asp:Button ID="ChangePasswordPushButton" ValidationGroup="changePass" CommandName="ChangePassword" CssClass="btn btn-primary orange-gradiant float-shadow" runat="server" Text="Save" OnClick="ChangePasswordPushButton_Click" />
                        </span>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
